package bitmapdata
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.geom.ColorTransform;
	import flash.geom.Rectangle;
	
	public class TestColorTransform extends Sprite
	{
		public function TestColorTransform()
		{
			test();
		}
		
		public function test():void {
			var bmd:BitmapData = new BitmapData(100,100,false,0xff0000);
			var bmp:Bitmap = new Bitmap(bmd);
			this.addChild(bmp);
			trace(bmd.getPixel32(0,0).toString(16)+"------------------------");
			trace((bmd.getPixel(0,0)>>>16)+"------------------------");
			var colorTransform:ColorTransform = new ColorTransform();
//			colorTransform.alphaMultiplier = .5;
			colorTransform.redMultiplier = .5;
			bmd.colorTransform(new Rectangle(0,0,50,100),colorTransform);
			
			trace(bmd.getPixel32(0,0).toString(16)+"------------------------");
			trace((bmd.getPixel(0,0)>>>16)+"------------------------");
		}
	}
}